package com.jiuling.apis.service.basic;

import com.jiuling.apis.model.Pmodel.Porder;
import com.jswzc.dao.mdao.DaoSupport;
import com.jswzc.framework.util.PageData;
import com.jswzc.model.Pager;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by tomchen on 17/6/9.
 */
@Service("orderService")
public class OrderServiceImpl implements OrderServiceI{
    @Resource(name = "daoSupport")
    private DaoSupport dao;

    @Override
    public Pager<Porder> queryOrder(Pager<Porder> pager) throws Exception {
        return dao.findForPager("orderDao.queryOrder","orderDao.queryOrderCount",pager);
    }

    @Override
    public Map<String, Object> queryOrderStatic(Map<String, Object> params) throws Exception {
        return (Map<String, Object>) dao.findForObject("orderDao.queryOrderStatic", params);
    }

    @Override
    public List<Map<String,Object>> queryOrderForExcel(Map<String, Object> params) throws Exception {
        return (List<Map<String,Object>>) dao.findForList("orderDao.queryOrderForExcel",params);
    }
}
